//
//  ViewController.m
//  7.29练习
//
//  Created by ma c on 16/7/29.
//  Copyright © 2016年 zhang. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    //NSBlockOperation创建
NSBlockOperation * blockOp = [NSBlockOperation blockOperationWithBlock:^{
    
    [self downImage:nil];
}];
    [blockOp addExecutionBlock:^{
        NSLog(@"任务2");
       NSLog(@"%@",[NSThread currentThread]);
    }];
    
    [blockOp start];
    
}

-(void)downImage:(id)sender{

    NSLog(@"%@",[NSThread currentThread]);

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end






















